package work.parabola.assets.common;

/**
 * 
 * @author 黄松祥
 *
 * 2018年5月17日 上午11:45:28
 */
public class IssueConst {
	
	public static final String ATTACHMENT_TITLE_SEPARATOR = ":;";

	public static final String ATTACHMENT_FILE_SEPARATOR = ",";
	
	public static final int ISSUE_TYPE_REPORT = 0;
	
	public static final int ISSUE_TYPE_APPROVAL = 1;
	
	public enum ReportUrgency{
		NORMAL(0, "一般"), 
		URGENT(1, "紧急");
		private int code;
		private String value;
		
		ReportUrgency(int code, String value){
			this.code = code;
			this.value = value;
		}

		public int getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}
		
		public static ReportUrgency codeOf(int code){
            for(ReportUrgency reportUrgency : values()){
                if(reportUrgency.getCode() == code){
                    return reportUrgency;
                }
            }
            return null;
        }
	}
	public enum ApprovalUrgency{
		NORMAL(0, "一般"), 
		URGENT(1, "紧急");
		private int code;
		private String value;
		
		ApprovalUrgency(int code, String value){
			this.code = code;
			this.value = value;
		}

		public int getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}
		
		public static ApprovalUrgency codeOf(int code){
            for(ApprovalUrgency approvalUrgency : values()){
                if(approvalUrgency.getCode() == code){
                    return approvalUrgency;
                }
            }
            return null;
        }
	}
	public enum ApprovalStatus{
		UNAPPROVED(0, "未审批"), 
		APPROVED(1, "审批通过"),
		REJECTED(2, "拒绝");
		private int code;
		private String value;
		
		ApprovalStatus(int code, String value){
			this.code = code;
			this.value = value;
		}

		public int getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}
		
		public static ApprovalStatus codeOf(int code){
            for(ApprovalStatus approvalStatus : values()){
                if(approvalStatus.getCode() == code){
                    return approvalStatus;
                }
            }
            return null;
        }
	}
}




























